# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=adfspray
pkgver=6.3d7745d
pkgrel=6
pkgdesc='Python3 tool to perform password spraying against Microsoft Online service using various methods.'
groups=('blackarch' 'blackarch-cracker' 'blackarch-windows')
arch=('any')
url='https://github.com/xFreed0m/ADFSpray'
license=('GPL3')
depends=('python' 'python-colorlog' 'python-requests' 'python-requests-ntlm')
makedepends=('git')
source=("$pkgname::git+https://github.com/xFreed0m/ADFSpray.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i '1i\#!/usr/bin/python' ADFSpray.py
}

package() {
  cd $pkgname

  install -Dm 755 ADFSpray.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

